package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/7/29 下午1:12
 */
public class MessageResult implements Parcelable {
    /**
     * id : 2696
     * send_username : 系统管理员
     * send_time : 1505958773
     * receive_content : 您在一元一次方程-例3-绝对值方程留言已被老师处理，请注意查看
     * state : 2
     */

    private List<MessageResult> list;

    public List<MessageResult> getList() { return list;}

    public void setList(List<MessageResult> list) { this.list = list;}
    private String id;//消息id
    private String send_username;//发送消息者
    private String send_time;//发送消息时间
    private String receive_content;//消息内容
    private String state;//消息状态（1-未读，2-已读）

    public String getId() { return id;}

    public void setId(String id) { this.id = id;}

    public String getSend_username() { return send_username;}

    public void setSend_username(String send_username) { this.send_username = send_username;}

    public String getSend_time() { return send_time;}

    public void setSend_time(String send_time) { this.send_time = send_time;}

    public String getReceive_content() { return receive_content;}

    public void setReceive_content(String receive_content) { this.receive_content = receive_content;}

    public String getState() { return state;}

    public void setState(String state) { this.state = state;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.send_username);
        dest.writeString(this.send_time);
        dest.writeString(this.receive_content);
        dest.writeString(this.state);
    }

    public MessageResult() {}

    protected MessageResult(Parcel in) {
        this.id = in.readString();
        this.send_username = in.readString();
        this.send_time = in.readString();
        this.receive_content = in.readString();
        this.state = in.readString();
    }

    public static final Creator<MessageResult> CREATOR = new Creator<MessageResult>() {
        @Override
        public MessageResult createFromParcel(Parcel source) {return new MessageResult(source);}

        @Override
        public MessageResult[] newArray(int size) {return new MessageResult[size];}
    };
}
